{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "collapsed": true,
        "pycharm": {
          "name": "#%% md\n"
        }
      },
      "source": "# Movielens中的长尾分析"
    },
    {
      "cell_type": "markdown",
      "source": "## 读取数据源",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "outputs": [],
      "source": "import pandas as pd\nm_data \u003d pd.read_csv(\u0027./data/u.data\u0027, sep\u003d\u0027\\t\u0027, names\u003d[\u0027user_id\u0027, \u0027item_id\u0027, \u0027rating\u0027, \u0027timestamp\u0027])",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "outputs": [
        {
          "data": {
            "text/plain": "   user_id  item_id  rating  timestamp\n0      196      242       3  881250949\n1      186      302       3  891717742\n2       22      377       1  878887116\n3      244       51       2  880606923\n4      166      346       1  886397596",
            "text/html": "\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border\u003d\"1\" class\u003d\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style\u003d\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003euser_id\u003c/th\u003e\n      \u003cth\u003eitem_id\u003c/th\u003e\n      \u003cth\u003erating\u003c/th\u003e\n      \u003cth\u003etimestamp\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003ctd\u003e196\u003c/td\u003e\n      \u003ctd\u003e242\u003c/td\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003e881250949\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003ctd\u003e186\u003c/td\u003e\n      \u003ctd\u003e302\u003c/td\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003e891717742\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003ctd\u003e22\u003c/td\u003e\n      \u003ctd\u003e377\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e878887116\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003ctd\u003e244\u003c/td\u003e\n      \u003ctd\u003e51\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003e880606923\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003ctd\u003e166\u003c/td\u003e\n      \u003ctd\u003e346\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e886397596\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 5
        }
      ],
      "source": "m_data.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 获取每个item_id出现的次数",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "source": "item_id_counts \u003d m_data[\u0027item_id\u0027].value_counts()\nitem_id_counts.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      },
      "execution_count": 6,
      "outputs": [
        {
          "data": {
            "text/plain": "50     583\n258    509\n100    508\n181    507\n294    485\nName: item_id, dtype: int64"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 6
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": "## 重置索引",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "outputs": [
        {
          "data": {
            "text/plain": "0    583\n1    509\n2    508\n3    507\n4    485\nName: item_id, dtype: int64"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 8
        }
      ],
      "source": "item_id_counts.index \u003d range(item_id_counts.count())\nitem_id_counts.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 画图",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "outputs": [
        {
          "data": {
            "text/plain": "Text(0.5, 1.0, \u0027item rating times\u0027)"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 10
        },
        {
          "data": {
            "text/plain": "\u003cFigure size 432x288 with 1 Axes\u003e",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEWCAYAAACe8xtsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxcdb3/8dcna9Mmabqk+5IuodCqhVKggGBZBUTABcUFCvKz6lWRq/dyER4PUe9VcUVx4V4UpKCyiCBFEaiVTRBoWrpQWmgobZOu6Zama7bP74/zTTtt03YmzSzJvJ+PxzzmzHfOzHzmNM075/s953vM3REREUlETroLEBGRrkfhISIiCVN4iIhIwhQeIiKSMIWHiIgkTOEhIiIJU3hIxjCzxWY2Nd11dJSZ3WRmv0nR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ZAdLnfNk8BXwjdRpjZMWGm4GR5nmh21twwg2vbHsybQLmZnRrqyDezCWH5w0QTI54J3G7hWuAiqaY9D8lmC4FmM1tANAvpz4iOwJoXpqauI4mXPiW69snZRF1fbwHPAbh7Y+g6u93MehP9P/2pma0nGuQ/x91rwoD8z9g3PbtIymhWXRERSZi6rUREJGEKDxERSZjCQ0REEqbwEBGRhCk8REQkYQoPERFJmMJDREQS9v8BwDXTDVCN3KYAAAAASUVORK5CYII\u003d\n"
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": "import matplotlib.pyplot as plt\nplt.plot(item_id_counts.index, item_id_counts)\nplt.xlabel(\u0027item index\u0027)\nplt.ylabel(\u0027item counts\u0027)\nplt.title(\u0027item rating times\u0027)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "outputs": [],
      "source": "plt.show()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "outputs": [],
      "source": "\n",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n"
        }
      }
    }
  ],
  "metadata": {
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 2
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython2",
      "version": "2.7.6"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}